package com.xbongbong.saas.domain.entity;

import com.xbongbong.paas.toolbox.util.DateTimeUtil;
import com.xbongbong.paas.toolbox.util.DateUtil;
import lombok.Getter;
import lombok.Setter;

/**
 * @author: yingjf
 * @date: 2023/3/7 18:55
 * @description:
 */
@Getter
@Setter
public class ContractTemplateBaseEntity {
    /**
     * 主键id
     */
    private Long id;
    /**
     * 公司id
     */
    private String corpid;

    /**
     * 模板名称
     */
    private String templateName;

    /**
     * 文件名
     */
    private String fileName;

    /**
     * 文件url
     */
    private String fileUrl;

    /**
     * 文件后缀
     */
    private String fileExt;

    /**
     * 文件大小
     */
    private Long fileSize;

    /**
     * 文件上传时间
     */
    private Long fileUploadTime;

    /**
     * 查看权限
     */
    private String viewPermission;

    /**
     * 是否启用 0未启用 1启用
     */
    private Integer enable;

    /**
     * 创建者id
     */
    private String creatorId;
    /**
     * 创建时间
     */
    private Long addTime;
    /**
     * 更新时间
     */
    private Long updateTime;
    /**
     * 删除标志
     */
    private int del;

    public ContractTemplateBaseEntity() {
    }

    public ContractTemplateBaseEntity(String corpid, String templateName, String fileName, String fileUrl, String fileExt, Long fileSize, String creatorId,String viewPermission) {
        long now = DateTimeUtil.getInt();
        this.corpid = corpid;
        this.templateName = templateName;
        this.fileName = fileName;
        this.fileUrl = fileUrl;
        this.fileExt = fileExt;
        this.fileSize = fileSize;
        this.fileUploadTime = now;
        this.enable = 1;
        this.creatorId = creatorId;
        this.del = 0;
        this.viewPermission = viewPermission;
    }
}

